<%@taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="design/styly.jsp" />
<title>Manager</title>
</head>
<body><jsp:include page="design/hlavicka.jsp" />
<div id="menu">
<p><a href="managerHome" class="selected">Díly</a>
<a href="managerDodavatele">Dodavatelé</a>
<em class="right">Je spuštěn managerský mod !</em>
</p>
</div>
<h1>Správa dílů</h1>


<h3>Celková cena: ${cenaCelkem}</h3>
<form:form commandName="filtrDily" action="managerFiltrujDily">
 
    <table >
    <tr>
        <td><form:label path="stitek">Štítek</form:label></td>
        <td><form:select path="stitek"> <form:options items="${stitky}"/></form:select></td></tr><tr>
        <td><form:label path="katCislo">Katalogové číslo</form:label></td>
        <td><form:input path="katCislo" /></td></tr><tr>
        <td><form:label path="nazev">Název</form:label></td>
        <td><form:input path="nazev" /></td>
      </tr><tr>
        <td colspan="2">
        <input type="submit" value="Filtruj"/>
        </td>
    </tr>
</table>  
 <br />
</form:form>
<table class="tablesorter">
	<c:forEach var="dil" items="${dily}">
		<tr title="${dil.poznamka}">
        	<td>${dil.katalogoveCislo}</td><td>${dil.nazev}</td><td>${dil.pocetKusu}</td><td>${dil.cenaKc}</td><td>${dil.cenaEur}</td>
        	<td>${dil.cenaUsd}</td><td><a href="precenit?id=${dil.id}">Přecenit</a></td>
        </tr>
	</c:forEach>
</table>

</body>
</html>